﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
  <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>My JSP 'index.jsp' starting page</title>
	 
		 <link rel="stylesheet"
			href="../../../css/table.css" type="text/css">
		<link rel="stylesheet"
			href="../../../css/cwcalendar.css" type="text/css">
		<script type="text/javascript"
			src="../../../javascript/comm/comm.js">
		</script>
		<script type="text/javascript"
			src="../../../javascript/comm/list.js">
		</script>
		<script type="text/javascript"
			src="../../../javascript/calendar-ch.js">
		</script>
		<script type="text/javascript"
			src="../../../javascript/jquery-1.7.2.js">
		</script>
		<script type="text/javascript"
			src="../../../javascript/locate.js">
		</script>
	
	
 		<script type="text/javascript">
 			window.onload=check;
		function tick() {
			var now = new Date();
			var hours, minutes, seconds, noon;
			var intHours, intMinutes, intSeconds;
			intHours = now.getHours();
			intMinutes = now.getMinutes();
			intSeconds = now.getSeconds();
			if (intHours < 24) {
				hours = intHours+":";
				noon = "A.M.";
			} else {
				intHours = intHours - 24;
				hours = intHours + ":";
				noon = "P.M.";
			}
			if (intMinutes < 10) {
				minutes = "0"+intMinutes+":";
			} else {
				minutes = intMinutes+":";
			}
			if (intSeconds < 10) {
				seconds = "0"+intSeconds+" ";
			} else {
				seconds = intSeconds+" ";
			}
			timeString = hours+minutes+seconds;
			var now = new Date();
		  	document.getElementById("nowTime").value=now.getFullYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" "+timeString;
			window.setTimeout("tick();", 1000);
		}
		
		//load事件
		function check(){
			//获得系统当前时间的方法
		  	tick();					
		}
 		</script>
 	<script type="text/javascript">
 	   function mysubmit(){  
 	   	document.getElementById('deadline').value = document.getElementById('date_start').value;
				
 	    if(document.getElementById("firstKindId").value==""){
 	       alert("请选择一级机构");
 	       return ;
 	       }
 	  if(document.getElementById("engageType").value==""){
 	       alert("请选择招聘类型");
 	       return ;
 	       } 
 	  if(document.getElementById("majorKindId").value==""){
 	       alert("请选择职位分类");
 	       return ;
 	       }    
 	   if(document.getElementById("majorId").value==""){
 	       alert("请选择职位名称");
 	       return ;
 	       }    
 	  if(document.getElementById("humanAmount").value==""){
 	   alert("请填写招聘人数");
 	       return ; 
 	  }    
 	  if(document.getElementById("date_start").value==""){
 	   alert("请选择截止日期");
 	       return ; 
 	  }   
  
		  	document.humanfileForm.submit();
	}
 	
	 
</script> 

<script type="text/javascript">
	$(function(){
		$.ajax({
			url:"http://127.0.0.1:8080/configMajorKindGetAll/",
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,fenlei){
					$("#majorKindId").append('<option value="'+fenlei.majorKindId+'">'+fenlei.majorKindName+'</option>');
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
		
	});
	function geterji(event){
		$("#secondKindId,#thirdKindId").find("option").remove();
		$("#secondKindId").append('<option>--请选择--</option>');
		$("#thirdKindId").append('<option>--请选择--</option>');
		var id = $(event).find("option:selected").val();
		getyijimingcheng(id);
		$.ajax({
			url:"http://127.0.0.1:8080/getconfigFileSecondKind/"+id,
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,erji){
					$("#secondKindId").append('<option value="'+erji.secondKindId+'">'+erji.secondKindName+'</option>');
					
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
		
	}
	function getyijimingcheng(id){
		$("#yiji").find("input").remove();
		$.ajax({
			url:"http://127.0.0.1:8080/configFileFirstkind/configFileFirstkindgetByfirstKindId/"+id,
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,s){
					$("#yiji").append('<input type="hidden" name="firstKindName" value="'+s.firstKindName+'"/>');
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
		
	}
	function getsanji(event){
		$("#thirdKindId").find("option").remove();
		$("#thirdKindId").append('<option>--请选择--</option>');
		var id = $(event).find("option:selected").val();
		geterjimingcheng(id);
		$.ajax({
			url:"http://127.0.0.1:8080/configFileThirdKindGetAll/"+id,
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,sanji){
					$("#thirdKindId").append('<option value="'+sanji.thirdKindId+'">'+sanji.thirdKindName+'</option>');
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
		
	}
	function geterjimingcheng(id){
		$("#erji").find("input").remove();
		$.ajax({
			url:"http://127.0.0.1:8080/configFileSecondKindGetBySecondKindId/"+id,
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,s){
					$("#erji").append('<input type="hidden" name="secondKindName" value="'+s.secondKindName+'"/>');
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
		
	}
	function getsanjimingcheng(event){
		$("#sanjimingcheng").find("input").remove();
		var id = $(event).find("option:selected").val();
		$.ajax({
			url:"http://127.0.0.1:8080/configFileThirdKindgetBythirdKindId/"+id,
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,s){
					$("#sanjimingcheng").append('<input type="hidden" name="thirdKindName" value="'+s.thirdKindName+'"/>');
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
	}
	function getzhiweimingcheng(event){
		$("#zhiwei").find("input").remove();
		var id = $(event).find("option:selected").val();
		$.ajax({
			url:"http://127.0.0.1:8080/configMajorGetBymajorId/"+id,
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,s){
					$("#zhiwei").append('<input type="hidden" name="majorName" value="'+s.majorName+'"/>');
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
		
	}
	function getfengleimingcheng(id){
		$("#fenglei").find("input").remove();
		$.ajax({
			url:"http://127.0.0.1:8080/configMajorKindGetBymajorKindId/"+id,
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,s){
					$("#fenglei").append('<input type="hidden" name="majorKindName" value="'+s.majorKindName+'"/>');
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
		
	}
	function getzhiwei(event){
		var id = $(event).find("option:selected").val();
		getfengleimingcheng(id);
		$.ajax({
			url:"http://127.0.0.1:8080/configMajorGetBymajorKindId/"+id,
			success:function(response){
			if(response.success){
				$.each(response.data,function(i,zhiwei){
					$("#majorId").append('<option value="'+zhiwei.majorId+'">'+zhiwei.majorName+'</option>');
				});
			}
		},error:function(){
			alert("出现未知错误,请联系站内管理员!");
		}
			
		});
		
	}
</script>
 	</head>
	<body>
		<form name="humanfileForm" method="post" action="/engageMajorReleaseAdd" >
			<table width="100%">
				<tr>
					<td>
						<font color="black">您正在做的业务是：人力资源--招聘管理--职位发布管理--职位发布登记 </font>
					</td>
				</tr>
				<tr>
					<td align="right">
						<input type="submit" value="提交" class="BUTTON_STYLE1" 
						  >
						<input type="reset" value="清除" class="BUTTON_STYLE1">
					</td>
				</tr>
			</table>
			<table width="100%" border="1" cellpadding=0 cellspacing=1
				bordercolorlight=#848284 bordercolordark=#eeeeee
				class="TABLE_STYLE1">
				<tr>
					<td class="TD_STYLE1" width="11%" id="yiji">
						I级机构
					</td>
					<td width="14%" class="TD_STYLE2">
						
						<select name="firstKindId" id="firstKindId" onchange="geterji(this)"  class="SELECT_STYLE1"> 
						<option >--请选择--</option>
						<option th:each="c:${arr}" th:value="${c.ffkId}" th:text="${c.firstKindName}"></option>
					
					
					 
					 </select>
					</td>
					<td width="11%" class="TD_STYLE1" id="erji">
						II级机构
					</td>
					<td width="14%" class="TD_STYLE2">
						<select name="secondKindId" id="secondKindId" onchange="getsanji(this)" class="SELECT_STYLE1"> 
						<option>--请选择--</option>
						</select>
					</td>
					<td width="11%" class="TD_STYLE1" >
						III级机构
					</td>
					<td class="TD_STYLE2" id="sanjimingcheng" >
						<select name="thirdKindId" id="thirdKindId" onchange="getsanjimingcheng(this)" class="SELECT_STYLE1">
							<option>--请选择--</option>
						</select>
					</td>
					
					<td width="11%" class="TD_STYLE1">
						招聘类型
					</td>
					<td class="TD_STYLE2" colspan="2">
					<select name="engageType" id="engageType" class="SELECT_STYLE1"> 
							<option value="">--请选择--</option> 
							
							<option value="校园招聘">校园招聘</option> 
							
							<option value="社会招聘">社会招聘</option> 
							
								 </select>
						 
					</td>
				</tr>
				<tr>
					<td class="TD_STYLE1" id="fenglei">
						职位分类
					</td>
					<td class="TD_STYLE2">
						<select name="majorKindId" id="majorKindId" onchange="getzhiwei(this)" class="SELECT_STYLE1">
							<option >--请选择--</option> 
							
							
							
								 </select>
					</td>
					<td class="TD_STYLE1" id="zhiwei">
						职位名称
					</td>
					<td class="TD_STYLE2">
						<select name="majorId" id="majorId" onchange="getzhiweimingcheng(this)" class="SELECT_STYLE1"> 
							<option value="">--请选择--</option>
						</select>
					</td>
					<td class="TD_STYLE1">
						招聘人数
					</td>
					<td   class="TD_STYLE2">
						 <input type="text" name="humanAmount" id="humanAmount"  class="INPUT_STYLE2">
					</td>
					<td class="TD_STYLE1">
						截止日期
					</td>
					<td   class="TD_STYLE2">
							  <input type="text" name="deadLine" 
							  class="INPUT_STYLE2" id="date_start">
					</td>
				</tr>
				<tr>
				<td class="TD_STYLE1">
						登记人
					</td>
					<td  class="TD_STYLE2">
						 <input type="text" name="register" value="admin" class="INPUT_STYLE2">
					</td>
					<td class="TD_STYLE1">
						登记时间
					</td>
					<td   class="TD_STYLE2">
					
							<input type="text" name="registTime"
							  id="nowTime" readonly="readonly"
							class="INPUT_STYLE2">
					</td>
					
					<td>&nbsp; </td>
					<td>&nbsp; </td>
					<td>&nbsp; </td>
					<td>&nbsp; </td>
					
				</tr>
				<tr>
					<td class="TD_STYLE1">
						职位描述
					</td>
					<td class="TD_STYLE2" colspan="8">
						<textarea name="majorDescribe" rows="4" cols="80" class="TEXTAREA_STYLE1"></textarea>
					</td>
					 
				</tr>
					<tr>
					<td class="TD_STYLE1">
						招聘要求
					</td>
					<td class="TD_STYLE2" colspan="8">
						<textarea name="engageRequired" rows="4"  cols="80" class="TEXTAREA_STYLE1"></textarea>
					</td>
					 
				</tr>
			</table>
		</form>
	</body>
 
</html>


